// Comp/collectbar/collectbar.js
Component({
  data: {
    activeIndex: 0
  },
  methods: {
    onBarItemTap: function(e) {

      const index = e.currentTarget.dataset.index;

      this.setData({
        activeIndex: index
      });
    }
  }
});
